home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / PASANS.ZIP / CH11_1.PAS < prev    next >
Pascal/Delphi Source File  |  1991-02-04  |  636b  |  33 lines

  1.                            (* Chapter 11 - Programming exercise 1 *)
  2. program Read_A_File;
  3.  
  4. var Turkey     : TEXT;
  5.     Big_String : string[80];
  6.  
  7. begin  (* main program *)
  8.    Assign(Turkey,'CH11_1.PAS');
  9.  
  10.    Reset(Turkey);
  11.    while not Eof(Turkey) do begin
  12.       Readln(Turkey,Big_String);
  13.       Writeln(Big_String);
  14.    end;  (* of while loop *)
  15.  
  16.    Reset(Turkey);
  17.    while not Eof(Turkey) do begin
  18.       Readln(Turkey,Big_String);
  19.       Writeln(Big_String);
  20.    end;  (* of while loop *)
  21.  
  22.    Close(Turkey);
  23. end.  (* of program *)
  24.  
  25.  
  26.  
  27.  
  28. { Result of execution
  29.  
  30. (This file is displayed twice on the monitor)
  31.  
  32. }
  33.